using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using PSLib.Drawing;
using System.Drawing.Drawing2D;

namespace LuaCodeStyler
{
	public partial class aboutForm : Form
	{
		public aboutForm()
		{
			InitializeComponent();
			this.DoubleBuffered = true;
			highColor = Color.FromArgb(180,180,255);
			lowColor = Color.FromArgb(255,255,255);
			angle = 0;
		}

		protected override void OnPaint(PaintEventArgs e)
		{
			e.Graphics.Clear(Color.White);
			LinearGradientBrush brush = new LinearGradientBrush(this.ClientRectangle, highColor, lowColor, angle);
			e.Graphics.FillRectangle(brush, this.ClientRectangle);

		}
		private void aboutForm_Load(object sender, EventArgs e)
		{
			labelVersion.Text = string.Format("{0,-15}\t{1}","Version:",Application.ProductVersion);
			labelBuildDate.Text = string.Format("{0,-15}\t{1}", "Build Date:", "27.03.2010");
		}

		private void timer1_Tick(object sender, EventArgs e)
		{
			angle += 2;
			highColor.Hue += 1;
			if (highColor.Hue >= 255) highColor.Hue = 0;
			if (angle >= 360) angle = 0;
			
			Invalidate();
		}
		
		private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			System.Diagnostics.Process.Start("explorer", "http://sites.google.com/site/pslibdevelop/lua/lua-code-styler");
		}

		private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			System.Diagnostics.Process.Start("mailto:ztBlackGad@gmail.com");
		}

		private HSLColor highColor;
		private HSLColor lowColor;
		private float angle;

		
	}
}